<template>
  <iframe id="RocketMQ" src="http://localhost:8077" :style="siteContentViewHeight" width="100%"></iframe>
</template>

<script>
import {isURL} from '@/utils/validate'

export default {
  name: "RocketMQ",

  // 计算属性用于动态调整iframe的高度
  computed: {
    // 动态设置画布高度
    documentClientHeight: {
      get () { return this.$store.state.common.documentClientHeight }
    },
    siteContentViewHeight () {
      var height = this.documentClientHeight
      if (this.$route.meta.isTab) {
        // height -= 40
        return isURL(this.$route.meta.iframeUrl) ? { height: height + 'px' } : { minHeight: height + 'px' }
      }
      return { minHeight: height + 'px' }
    }
  }

}

</script>

<style scoped>

</style>
